Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route comparison and scoring updates #22

Merged
merged 4 commits into from
Oct 11, 2024
Merged

Route comparison and scoring updates #22

merged 4 commits into from
Oct 11, 2024

Conversation

SGenheden
Copy link
Contributor

This includes changes from the internal repo that can be made public. I making this now because of the route comparison publication

  • Route comparison
  • TED calculations from route_distances
  • RetroBLEU
  • Route scoring and routines from route_distances

@SGenheden SGenheden added the enhancement New feature or request label Oct 7, 2024
Copy link
Collaborator

@CKannas CKannas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have inconsistent code styling, if you could run black on new/modified files it will help until we address it repo-wide.

rxnutils/routes/base.py Outdated Show resolved Hide resolved
@@ -349,7 +431,7 @@ def smiles2inchikey(smiles: str, ignore_stereo: bool = False) -> str:


def _assign_atom_mapped_smiles(
tree_dict: Dict[str, Any], reaction_smiles: str = ""
tree_dict: Dict[str, Any], reactants_smiles: List[str] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the default value for 'reactants_smiles' should be an empty list.

Suggested change
tree_dict: Dict[str, Any], reactants_smiles: List[str] = None
tree_dict: Dict[str, Any], reactants_smiles: List[str] = [],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should never have empty lists as default arguments


def route_distances_calculator(model: str, **kwargs: Any) -> RouteDistancesCalculator:
"""
Return a callable that given a list routes as dictionaries
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no mention in the docstring that must be either "ted" or "lstm"

@SGenheden SGenheden merged commit c809033 into main Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants